Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[No QA] Remove 2 methods that are no longer used in Deprecated API #14821

Merged
merged 2 commits into from
Feb 3, 2023

Conversation

yuwenmemon
Copy link
Contributor

Pullerbearing)

Details

Fixed Issues

None but just noticed while checking in on https://github.com/Expensify/Expensify/issues/208281

Tests/QA

  • None

Offline tests

  • N/A

QA Steps

  • None

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android / native
    • Android / Chrome
    • iOS / native
    • iOS / Safari
    • MacOS / Chrome / Safari
    • MacOS / Desktop
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is correct English and approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web
  • N/A
Mobile Web - Chrome
  • N/A
Mobile Web - Safari
  • N/A
Desktop
  • N/A
iOS
  • N/A
Android
  • N/A

@yuwenmemon yuwenmemon requested a review from a team as a code owner February 3, 2023 18:50
@yuwenmemon yuwenmemon self-assigned this Feb 3, 2023
@melvin-bot
Copy link

melvin-bot bot commented Feb 3, 2023

Looks like you modified deprecatedAPI.js! To be clear, you should not be adding any code to this file.

Instead, all new API commands should use API.js, and follow our guidelines for writing new API commands.

Unsure if your change is okay? Drop a note in #expensify-open-source!

@melvin-bot melvin-bot bot requested review from stitesExpensify and removed request for a team February 3, 2023 18:50
@yuwenmemon yuwenmemon requested review from jasperhuangg and a team and removed request for stitesExpensify February 3, 2023 18:50
@melvin-bot
Copy link

melvin-bot bot commented Feb 3, 2023

@stitesExpensify Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot melvin-bot bot requested review from stitesExpensify and removed request for a team February 3, 2023 18:51
@melvin-bot
Copy link

melvin-bot bot commented Feb 3, 2023

@stitesExpensify Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

jasperhuangg
jasperhuangg previously approved these changes Feb 3, 2023
@jasperhuangg
Copy link
Contributor

jasperhuangg commented Feb 3, 2023

NAB: There's a test that still refers to the CreateLogin method here, I believe this comment should be changed to BeginSignIn according to the command called above. Let's change that to avoid confusion?

// Response is the same for calls to Authenticate and CreateLogin

Sanity check: there don't seem to be any usages of DeleteLogin:
Screenshot 2023-02-03 at 10 54 02 AM

@jasperhuangg
Copy link
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified tests pass on all platforms & I tested again on:
    • Android / native
    • Android / Chrome
    • iOS / native
    • iOS / Safari
    • MacOS / Chrome / Safari
    • MacOS / Desktop
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is correct English and approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

N/A

Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android

Copy link
Contributor

@jasperhuangg jasperhuangg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nnnnnnnnnnoice

@yuwenmemon yuwenmemon merged commit f7f6216 into main Feb 3, 2023
@yuwenmemon yuwenmemon deleted the yuwen-removeDeprecated branch February 3, 2023 19:06
@OSBotify
Copy link
Contributor

OSBotify commented Feb 3, 2023

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2023

Performance Comparison Report 📊

Significant Changes To Duration

There are no entries

Meaningless Changes To Duration

Show entries
Name Duration
App start TTI 694.510 ms → 716.331 ms (+21.821 ms, +3.1%)
Open Search Page TTI 604.443 ms → 609.515 ms (+5.072 ms, +0.8%)
App start regularAppStart 0.014 ms → 0.015 ms (+0.001 ms, +5.8%)
App start nativeLaunch 19.321 ms → 19.103 ms (-0.218 ms, -1.1%)
App start runJsBundle 204.781 ms → 199.813 ms (-4.969 ms, -2.4%)
Show details
Name Duration
App start TTI Baseline
Mean: 694.510 ms
Stdev: 36.096 ms (5.2%)
Runs: 611.2742039998993 641.1708460000809 641.3997639999725 646.4697940000333 651.7716290000826 657.3879849999212 662.0318860001862 663.2524800000247 669.9881670000032 675.6104180000257 676.8648399999365 681.0813310001977 685.0848789999727 690.7763330000453 692.7885019998066 696.6960620000027 697.0812099999748 697.8924459998962 701.1085410001688 701.1764969998039 706.3060659999028 708.8682559998706 715.6342549999245 719.9702989999205 728.4807859999128 732.6385639999062 735.8828090000898 736.5067699998617 739.8313699997962 751.0624200000893 752.3803590000607 755.8633499999996

Current
Mean: 716.331 ms
Stdev: 39.756 ms (5.5%)
Runs: 643.1855469997972 659.9560369998217 678.0065069999546 679.8286410002038 680.5512439999729 680.5742069999687 681.7078649997711 683.1074569998309 688.498031000141 693.0718439999036 695.3087840001099 695.3603059998713 699.7901340001263 700.5187059999444 704.7930439999327 708.6419939999469 709.2880839998834 711.6414160002023 713.1215849998407 713.8029180001467 723.6544349999167 724.9294119998813 724.9972230000421 729.5437500001863 750.6681229998358 753.9531270000152 765.6178319999017 769.6476949998178 769.9931299998425 777.5753500000574 788.8505970002152 822.408371000085
Open Search Page TTI Baseline
Mean: 604.443 ms
Stdev: 21.659 ms (3.6%)
Runs: 562.2450359999202 572.8376460000873 576.4476319998503 584.7134199999273 585.0480140000582 585.4706620001234 590.0708409999497 592.4792479998432 594.380900000222 595.2623290000483 595.318684999831 595.5957039999776 597.5382489999756 598.0613609999418 600.2019050000235 600.2274580001831 602.4704180001281 604.2176109999418 605.2539880000986 605.5297440001741 606.5634360001422 607.9547930001281 608.4633789998479 616.744262999855 617.5486659999005 627.207438999787 628.6540120001882 629.1219889996573 640.9508460001089 641.5332849998958 669.631958999671

Current
Mean: 609.515 ms
Stdev: 18.927 ms (3.1%)
Runs: 578.1958830002695 583.0037840004079 585.8251959998161 586.894980000332 590.2177740000188 590.6175950001925 591.6826989999972 591.7342530000024 592.529378999956 595.165771999862 595.3339029997587 596.86067799991 599.1789959999733 602.7555749998428 602.9061290002428 603.3861899999902 609.7530519999564 610.203288000077 615.8610439999029 616.9241540003568 617.0256360000931 617.0282799997367 617.3255209997296 621.528157999739 624.0183520000428 624.4108889997005 626.1480719996616 626.5425619999878 631.0521240001544 633.7959389998578 634.5878090001643 643.1326089999638 658.3684900002554
App start regularAppStart Baseline
Mean: 0.014 ms
Stdev: 0.001 ms (5.9%)
Runs: 0.012614000122994184 0.012735999887809157 0.012776999967172742 0.012818000046536326 0.012858000118285418 0.013142999727278948 0.013224000111222267 0.013428000267595053 0.013467999873682857 0.013549000024795532 0.013753999955952168 0.013875999953597784 0.013915999792516232 0.013956000097095966 0.014078999869525433 0.01407900033518672 0.014240999706089497 0.014282000018283725 0.014282000251114368 0.014322999864816666 0.0143630001693964 0.014485999941825867 0.014526000013574958 0.014566999860107899 0.014566999860107899 0.014648000011220574 0.014851999934762716 0.01497400039806962 0.015056000091135502 0.015503000002354383 0.016112999990582466

Current
Mean: 0.015 ms
Stdev: 0.001 ms (6.3%)
Runs: 0.013224000111222267 0.013346000108867884 0.013712999876588583 0.01371300034224987 0.013793999794870615 0.0139979999512434 0.014159999787807465 0.014281999785453081 0.014282000251114368 0.014322000090032816 0.014485999941825867 0.014525999780744314 0.014607999939471483 0.014607999939471483 0.01460800040513277 0.014688999857753515 0.014689000323414803 0.014810999855399132 0.014851999934762716 0.014973999932408333 0.015056000091135502 0.01525900000706315 0.015298999845981598 0.01537999976426363 0.015746999997645617 0.015746999997645617 0.016032000072300434 0.01607199991121888 0.01615400006994605 0.016846000216901302 0.017008000053465366
App start nativeLaunch Baseline
Mean: 19.321 ms
Stdev: 1.489 ms (7.7%)
Runs: 17 18 18 18 18 18 18 18 18 19 19 19 19 19 19 19 19 19 19 20 20 20 21 21 21 21 22 24

Current
Mean: 19.103 ms
Stdev: 1.348 ms (7.1%)
Runs: 18 18 18 18 18 18 18 18 18 18 18 18 19 19 19 19 19 19 19 19 19 20 20 20 20 21 21 21 24
App start runJsBundle Baseline
Mean: 204.781 ms
Stdev: 33.168 ms (16.2%)
Runs: 156 159 165 168 169 169 171 175 177 184 188 192 193 193 199 201 201 203 203 205 206 211 219 224 234 237 237 246 260 260 262 286

Current
Mean: 199.813 ms
Stdev: 24.024 ms (12.0%)
Runs: 166 168 168 170 172 176 176 178 179 180 182 192 193 193 194 195 196 198 201 203 204 210 216 217 219 222 226 230 230 244 247 249

@OSBotify
Copy link
Contributor

OSBotify commented Feb 4, 2023

🚀 Deployed to staging by https://github.com/yuwenmemon in version: 1.2.65-0 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

OSBotify commented Feb 6, 2023

🚀 Deployed to production by https://github.com/mountiny in version: 1.2.65-2 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants